body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background-image: url("../Images/background2.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: -1;
}

.page-title {
  text-align: center;
  font-size: 3rem;
  color: #ffeb3b;
  margin-top: 20px;
  margin-bottom: 30px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.search-container {
  position: relative; /* Assure que suggestions est bien ancré */
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

#search-input {
  width: 320px;
  max-width: 90%;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  background-color: #fff;
  color: #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease;
}

#search-input:focus {
  box-shadow: 0 6px 14px rgba(255, 193, 7, 0.8);
}

.suggestions-box {
  background: white;
  color: black;
  border-radius: 0 0 8px 8px;
}

/* Car Viewer */
.content-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
  background-color: rgba(0, 0, 0, 0.85);
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.cars-button {
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin: 15px;
  width: 200px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  color: #fff;
  background: linear-gradient(145deg, #ffa000, #ff6f00);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.cars-button:hover {
  background: linear-gradient(145deg, #ffc107, #ff9800);
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.cars-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


.content {
  display: none;
  text-align: center;
}

.content.active {
  display: block;
}

.content img {
  border: 5px solid #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 20px auto;
}

.paragraphe {
  font-size: 1.1rem;
  line-height: 1.6;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f1f1;
  max-width: 800px;
  margin: 0 auto 30px;
}

/* Responsive */
@media (max-width: 600px) {
  .cars-button {
    width: 90%;
    margin: 10px auto;
  }

  .content img {
    width: 95%;
  }

  .search-container {
    width: 90%;
  }
}

#suggestions {
  position: absolute;
  top: calc(100% + 4px); 
  left: 50%; 
  transform: translateX(-50%);
  background: white;
  color: black;
  width: 320px;
  max-width: 90%;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  font-size: 0.95rem;
  overflow-y: auto;
  max-height: 300px;
  z-index: 10; 
  display: none;
  /* Masquer tout débordement des suggestions */
  overflow-x: hidden;
}

.search-container:focus-within #suggestions {
  display: block;
}

.suggestion {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.suggestion:hover {
  background-color: #f7f7f7;
  transform: scale(1.01);
}

/* Conteneur pour l'image avec overflow caché */
.suggestion .img-container {
  width: 100px;
  height: 60px;
  border-radius: 10px;
  margin-right: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  flex-shrink: 0;
  overflow: hidden; /* Masque les parties de l'image qui dépassent */
  position: relative;
}

.suggestion img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  
  /* Zoom sur l'image sans changer la taille du conteneur */
  transform: scale(1.8);
  transform-origin: 15% 80%;
  transition: transform 0.3s ease;
}

.button-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}


/* Zoom au survol */
.suggestion:hover img {
  transform: scale(2.8);
}

.suggestion span {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  font-family: Simpsons, Tahoma, sans-serif;
}